package com.snail.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by m on 2020/5/30.
 *
 * @author mandao
 */
@Api(tags = "index")
@RestController
@RequestMapping("/index/")
public class IndexController {

    @ApiOperation(value = "首页", notes = "字符串返回")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "str", value = "param", required = false, paramType = "query", dataType = "String")
    })
    @GetMapping("index")
    public String index(String str){
        return str;
    }

    @GetMapping("hello")
    public String hello(){
        return "hello world";
    }

}
